const useHotKeys = (keys: string, cb:()=> void)=> {
    const handleKeyDown = (e: KeyboardEvent)=> {
        if (e.key === keys) {
            cb()
        }
    }
    onMounted(()=>{
        document.addEventListener('keydown', handleKeyDown)
    })
    onUnmounted(()=>{
        document.removeEventListener('keydown', handleKeyDown)
    })
}

export default useHotKeys   